<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>    
<div class="top">
    	<div class="topbg">
            <div class="logo_sign">
            	<div class="logo"></div>
                <div class="sign">
                	<span>欢迎您</span>
                    <span class="sp_home">
                    		<a href="jsp/to_index_Servlet">首页</a>
                    </span>
                    <span class="sp_backstage">
                    		<a href="jsp/manager/home.jsp">后台管理</a>
                    </span>
                    <!-- <span class="sp_signout">退出</span> -->
                </div>
            </div> 
            <div class="nav">
            	<ul class="navUI">
                	<li><a href="jsp/to_index_Servlet">首页</a></li>
                <c:forEach items="${categories }" var="c">
                    <li><a href="jsp/toList_Servlet?id=${c.id }">${c.name }</a></li>
                </c:forEach>
                </ul>
            </div>
            <div class="banner">
            	<div class="banimg" id="banimgId"><img width="1072" height="241" src="theme/1/images/front/banner.png"></div>
            	
            </div>
        </div>
    </div>
    
    <script>
    		var arr_img=['theme/1/images/front/banner.png',
				'theme/1/images/front/banner2.jpg',
				'theme/1/images/front/banner3.jpg',
				'theme/1/images/front/banner4.jpg',
				'theme/1/images/front/banner5.jpg',
				'theme/1/images/front/banner6.jpg'];
			var box=document.getElementById('banimgId');
			box.style.cursor='pointer';
			var img=document.getElementsByTagName('img')[0];
			var currentIndex=1;
			function change(){
				img.src=arr_img[currentIndex];
				currentIndex=++currentIndex%6;
			}
			var a=setInterval(change,2000);
			box.addEventListener('mouseover',function(){
				clearInterval(a);
			});
			box.addEventListener('mouseout',function(){
				a=setInterval(change,2000);
			}); 	
    	
    </script>